<a name="top"></a>
<h2>Release 3.x.x</h2>
<h3>Features</h3>
<ul>
</ul>
<h3>Bug Fixes</h3>
<ul>
</ul>

<h2>Release 3.2.7</h2>
<h3>Features</h3>
<ul>
<li>Add native peer value accessors for Pointer</li>
<li>The <code>jna.library.path</code> property is now re-evaluated whenever a native library is loaded.  Previously this value was cached when the JNA classes loaded.
<li><code>Native.loadLibrary</code> can now load <code>.drv</code> files.
<li>Refactor <code>com.sun.jna.platform.win32.WINBASE</code> into <code>WinDef</code>, <code>WinNT</code> and <code>BaseTSD</code>, matching Windows SDK headers.
<li>Refactor constants from <code>com.sun.jna.platform.win32.GDI32</code> into <code>WinGDI</code>, matching Windows SDK headers.
<li>Refactor constants from <code>com.sun.jna.platform.win32.User32</code> into <code>WinUser</code>, matching Windows SDK headers.
<li>Refactor <code>platform.win32.WinNT.LARGE_INTEGER</code> into a union.
<li>Add <code>platform.win32.ObjBase</code>, <code>com.sun.jna.platform.win32.Ole32.CoInitializeEx</code>, <code>CoUninitialize</code>, and <code>CoCreateInstance</code>.
<li>Add <code>platform.win32.Oleaut32.SysAllocString</code> and <code>SysFreeString</code>.
<li>Add <code>platform.win32.Secur32.ImpersonateSecurityContext</code> and <code>RevertSecurityContext</code>.
<li>Add <code>platform.win32.WinNT.WELL_KNOWN_SID_TYPE</code>, <code>SECURITY_MAX_SID_SIZE</code> and other related SID-related constants.
<li>Add <code>platform.win32.Advapi32.CreateWellKnownSid</code> and <code>IsWellKnownSid</code> and <code>com.sun.jna.platform.win32.Advapi32Util.isWellKnownSid</code>.
<li>Add <code>platform.win32.Kernel32.GetVersion</code>, <code>GetVersionEx</code>, <code>GetSystemInfo</code>, <code>GetNativeSystemInfo</code>, <code>GlobalMemoryStatusEx</code>, <code>GetLogicalDriveStrings</code> and <code>IsWow64Process</code>.
<li>Add <code>platform.win32.Kernel32Util.getLogicalDriveStrings</code>.
<li>Add <code>platform.win32.User32.GetSystemMetrics</code>.
<li>Add <code>platform.win32.BaseTSD.DWORD_PTR</code>.
<li>Add <code>platform.win32.WinBase.SYSTEM_INFO</code> and <code>MEMORYSTATUSEX</code>.
<li>Add <code>platform.win32.WinNT.OSVERSIONINFOEX</code>, <code>VER</code> constants.
<li>Add <code>platform.win32.WinDef.ULONGLONG</code> and <code>DWORDLONG</code>.
<li>Add <code>platform.win32.Shell32.SHGetDesktopFolder</code> (prep work for Com4JNA).
<li>Add <code>platform.win32.Winspool.GetPrinterInfo</code>.
<li>Add <code>platform.win32.WinspoolUtil.getPrinterInfo1</code>.
<li>Add <code>platform.win32.GDI32.GetDeviceCaps</code>.
<li>Add <code>platform.win32.GDI32.GetDIBits</code>.
</ul>
<h3>BugFixes</h3>
<ul>
<li>Fix <code>ClassCastException</code> in <code>Structure.equals</code> (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=152">issue 152</a>).
<li>Fix bug initializing a structure object from existing memory when the
  structure has initialized fields (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=133">issue 133</a>).
<li>Fix NPE reading an array of string from a pointer when an element of the
  array is <code>NULL</code> (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=151">issue 151</a>).
<li>Avoid calling <code>UnregisterNatives</code> in native code (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=154">issue 154</a>).
<li>Compare unpacked library path against canonical (long) filename (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=156">issue 156</a>).
<li>Fix <code>read()</code> of uninitialized memory in <code>platform.win32.Advapi32Util.getTokenGroups</code> and <code>getTokenAccount</code>.
<li>Fix <code>com.sun.jna.platform.win32.Secur32.QuerySecurityContextToken</code> to take a <code>CtxtHandle</code> instead of <code>PSecHandle</code>.
<li>Fix definition of BITMAPINFO (platform/win32).
</ul>
<h2>Release 3.2.5</h2>
<h3>Features</h3>
<ul>
<li>Split code in examples.jar into a contrib platform.jar package and individual packages for demos.
<li>Fix Eclipse build and added Eclipse projects for all contrib samples, import projects from jnalib and contrib.
<li>Ensure Structure fields correctly ordered when inherited.
<li>Use explicit Structure field whenever provided, regardless of whether the VM requires it.
<li>Add Win32 mappings for two dozen functions from Kernel32.dll, Advapi32.dll, Netapi32.dll, Secur32.dll, NtDll.dll, Ole32.dll, Shell32.dll and Crypt32.dll to com.sun.jna.platform.win32.
<li>Port parts of WinError.h, WinNT.h, LMAccess.h, LMCons.h, LMErr.h, LMJoin.h, NTStatus.h, ShlObj.h, WinDef.h, ShellApi.h, Wdm.h, WinReg.h, WinCrypt.h, Sspi.h, Guid.h, NtSecApi.h and DsGetDc.h.
<li>Add Win32 simplified utility interfaces Kernel32Util, Advapi32Util, Netapi32Util, Crypt32Util, NtDllUtil, Shell32Util, Ole32Util and Secur32Util to com.sun.jna.platform.win32.
<li>Support unicode paths in W32FileUtils.
<li>Fix exception during dispose in W32FileMonitor.
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Provide String.replace for 1.4 compatibility.
<li>Avoid allocating memory when Structure is provided a pointer in the ctor.
<li>Ensure proper value returned in Pointer.getValue() for non-null, unchanged
NIO Buffer values.
<li>Use 1.4-compatible URI generation (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=149">issue 149</a>).
</ul>
<h2>Release 3.2.4</h2>
<h3>Features</h3>
<ul>
<li>Make Pointer ctor public.
<li>Provide access to Function objects for arbitrary Pointer values.
<li>Add linux/ia64 binaries (bpiwowar).  See <a href="https://jna.dev.java.net/issues/show_bug.cgi?id=134">issue 134 patch</a>.
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Use a more robust method to decode a file-based URL (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=135">issue 135</a>).
</ul>
<h2>Release 3.2.3</h2>
<h3>Features</h3>
<ul>
<li>Include version information in code in case package information lost.
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Fix WindowUtils exception on mouse over TrayIcon.
<li>Fix bug toggling windows transparent/opaque (win32/OSX).
<li>Avoid overwriting unchanged Pointer values in arrays (function calls with Pointer[] and Structure.read). 
<li>Ensure Structure fields marked <code>final</code> are never written.
<li>Fix bug preventing proper population Structure.ByReference fields on Structure read.
<li>Ensure double buffering is disabled in components added to a transparent window.
<li>Fix UnsatisfiedLinkError attempting to load system libraries under Web Start.
<li>Fix loading Web Start-provided libraries on OSX (libraries must have a .jnilib suffix under Web Start).
<li>Properly include sources in Maven zip file (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=129">Issue 129</a>).
</ul>
<h2>Release 3.2.2</h2>
<h3>Features</h3>
<ul>
<li>Provide length-specified Pointer.getStringArray()
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Fix crash with direct mapping if NULL struct* used (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=125">Issue 125</a>).
<li>Fix case where null-valued Structure fields would get non-null values on
  write. 
<li>Synch callback Structure/Structure[] arguments on callback return.
<li>Fix NPE when mapping an interface to the current process.
<li>Automatically load proper C library version from current process on Linux
  (avoids crashing bug on Ubuntu with libc-i686 packages active).
<li>Avoid scanning structure contents in Structure.toString if contents aren't
 actually used.
</ul>
<h2>Release 3.2.1</h2>
<h3>Features</h3>
<ul>
<li>Add HRESULT, LONG mapping to W32API (marc strapetz).
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Fix definition of HWND_BROADCAST in W32API.
<li>Fix memory alignment checking (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=121">Issue 121</a>).
<li>Fix
  Structure <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals/hashCode</a>
  implementation, based on current Java fields rather than strictly native
  memory contents.  Avoid using equals/hashCode when avoiding recursive
  reads/writes. 
</ul>
<h2>Release 3.2.0</h2>
<h3>Features</h3>
<ul>
<li>Handle String, Structure, Callback, Buffer, and primitive arrays in direct
  mappings.  Handle NativeMapped and TypeMapper, with optimized paths for
  IntegerType and PointerType.
<li>Optionally throw errno/GetLastError as an exception.  This is preferred to
  (and more efficient than) calling Native.getLastError().
<li>Unload/delete native library unpacked from jna.jar if Native class is garbage collected.  Only install shutdown hook if using the system class loader. 
<li>Auto-write contiguous Structure arrays when first element is written.
<li>Support NativeMapped[] as function arguments for interface-mapped
  libraries (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=90">Issue 90</a>).
<li>Enable function lookup within current process on Windows.
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Restrict recursive structure reads/writes by thread instead of globally.
  This avoids potentially missed reads/writes with concurrent access (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=120">Issue 120</a>).
<li>Ensure Memory is not GC'd and freed if direct NIO buffers mapped to it are extant.
<li>Allow types derived from java.nio.Buffer as Structure fields.
</ul>
<h2>Release 3.1.0</h2>
<h3>Features</h3>
<ul>
<li>Add raw JNI mapping of static Java methods.  Performance is about 10X that of traditional JNA interface mapping, although with less type conversion functionality. 
<li>Add library option to allow passing/return of Java Objects.
<li>Allow handling of uncaught callback exceptions (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=63">Issue 63</a>).
<li>Object oriented interface to X server (see contrib/x11)
<li>Make Memory class more accessible.
<li>Provide Structure ctor with Pointer argument (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=102">issue 102</a>).
<li>Allow implicit library access to current process on linux (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=98">issue 98</a>).
<li>Open all shared libraries with RTLD_GLOBAL, if applicable.  This was the
  default behavior on OSX and changes the default behavior on linux.
<li>Allow NIO Buffer as Structure field (with limitations) (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=57">Issue 57</a>)
<li>Add <code>size_t</code> size.
</ul>
<b>Bug Fixes</b>
<ul>
<li>Run tests with <a href="http://java.sun.com/j2se/1.4.2/docs/guide/vm/signal-chaining.html">libjsig.so</a>, if available, which fixes some crashes when running tests on 64-bit platforms. 
<li>Fix <a href="https://jna.dev.java.net/issues/show_bug.cgi?id=104">Issue 104</a>.
<li>Fix <a href="https://jna.dev.java.net/issues/show_bug.cgi?id=94">Issue 94</a> (Java 1.6 update 10 regression).
<li>Fix <a href="https://jna.dev.java.net/issues/show_bug.cgi?id=51">Issue 51</a> (Java 1.6 update 10 regression).
<li>Fix <a href="https://jna.dev.java.net/issues/show_bug.cgi?id=95">Issue 95</a>.
<li>Fix <a href="https://jna.dev.java.net/issues/show_bug.cgi?id=101">Issue 101</a>.
<li>Fix <a href="https://jna.dev.java.net/issues/show_bug.cgi?id=111">Issue 111</a>, memory leak with String-returning Callback.
<li>Fix missing storage of union type information (affects usage of struct/union by value as argument and return type).
<li>Remove non-functional Structure ctors requiring explicit size.
</ul>
<h2>Release 3.0.9</h2>
<b>Bug Fixes</b>
<ul>
<li> Fix <a href="https://jna.dev.java.net/issues/show_bug.cgi?id=93">issue 93</a> by only manually searching jna.library.path, then falling back to passing the mapped library name to dlopen/LoadLibrary.  This fixes an <a href="http://jira.codehaus.org/browse/JRUBY-3084">issue in JRUBY</a> where the incorrect libc.so.6 was being loaded.
</ul>
<h2>Release 3.0.8</h2>
<h3>Features</h3>
<ul>
<li>Auto-map Pointer[]/String[]/WString[] return values.
<li>Provide utility functions to convert String to primitive array.
<li>Add jna.library.boot.path property to define the directory that the native stub library is loaded from
</ul>
<h2>Release 3.0.7</h2>
<h3>Features</h3>
<ul>
<li>Improve win32 loading of libraries with dependencies.
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Fix bug reading structures with PointerType fields, introduced with Pointer field preservation fix.
</ul>
<h2>Release 3.0.6</h2>
<h3>Features</h3>
<ul>
<li>Allow arbitrary callback method names if only one method is defined in the class which implements Callback (colinwalters).
<li>Allow specification of callback type mappers by using a TYPE_MAPPER field (colinwalters).
<li>Allow uninitialized (null-valued) boxed primitives in Structures (colinwalters).
<li>Add convenience methods to set active Union field and value simultaneously (xylo).
<li>Augment Union read/writeField to set the active field.
<li>Allow Structure auto-synch across native calls to be disabled.
<li>Win64 support.
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Avoid overwriting unchanged Structure fields of type Pointer.
<li>Avoid more content dragging on OSX or warn if it's too late.
<li>Fix UnsatisfiedLinkError using transparent window on Win2K.
<li>Fix memory leak with callbacks called from native threads with no Java context (johnwallace).  
<li>Defer structure size calculation if type mapper not yet set, allowing type mapper to be set in derived constructors (colinwalters).
<li>Ensure structure memory is allocated in Structure.read/writeField.
</ul>
<h2>Release 3.0.5</h2>
<h3>Features</h3>
<ul>
<li>Allow explicit declaration of field order for VMs which have an unpredictable field order.
<li>Check for w32 libraries with a "lib" prefix in addition to normal lookup.
<li>Allow String[]/WString[] as callback argument/return value (assume NULL-terminated array).
<li>Add Solaris8 compatibility to sunos-sparc build (Corey Puffalt).
<li>Look up libraries using web start library path, if appropriate (Corey Puffalt).
<li>Use constants to return integer boolean values.
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Properly track cursor on alpha-masked windows.
<li>Avoid searching /lib or /usr/lib on 64-bit Linux.
<li>Avoid using incorrect version of a library when both 32- and 64-bit versions are found.
<li>Avoid transparent window events always dragging window bug on OSX.
<li>Fix division by zero error calculating structure size on OSX/ppc.
<li>Avoid overwriting initialized NativeMapped Structure fields when calculating structure size.
<li>Fix NPE reading back into StringArray.
</ul>
<h2>Release 3.0.4</h2>
<h3>Features</h3>
<ul>
<li>Automatically write contents of Structure.ByReference fields on Structure.write().
<li>Use the actual parameter type in Function invocations if no parameter type information is available (whether method is missing or untyped varargs).
<li>Augmented X11 library mappings (xylo).
<li>Support read/write of NativeMapped arrays within Structure (notably NativeLong).
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Fix library load error when /usr/lib32 and /usr/lib both exist (linux) (Marek Slama).
<li>Avoid incorrect matches against libraries named with the same prefix
  (e.g. libc-client.so vs libc.so) (xylo).
<li>Properly handle arrays of NativeMapped (e.g. NativeLong) as a Structure field (stefan endrullis).
<li>Ensure structure size calculated prior to setting union active type.
<li>XID is 64-bits on 64-bit X clients (xylo).
<li>Ensure proper arch name is used on Debian (amd64 instead of x86_64).
</ul>
<h2>Release 3.0.3</h2>
<h3>Features</h3>
<ul>
<li>Enable build/run using IBM's J9 VM (leonardo).
<li>Make StdCallFunctionMapper attempt a leading underscore if the simpler mapping doesn't work.
<li>Allow Structure.read to overwrite final fields (may not work on some 1.4 VMs). 
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Fix NPE when passing an array of Structure.ByReference.
<li>Compare entire linux library version when finding a match.
<li>Don't pass struct by value unless the method signature declares it.
<li>Restrict custom first element structure alignment to OSX/ppc.
<li>Improve performance and reduce memory footprint for window masks.
  Optimize polygon-based masks on w32.  Use XFillRectangles on X11.
<li>Fix linkage settings on sunos-amd64 to avoid relocation errors.
<li>Fix callback allocation code on w32, solaris, freebsd, darwin (libffi was misconfigured).
<li>Fix bug when NativeMapped fields are used in a Structure.ByValue instance.
<li>Fix NPE calling Structure.read() before memory is initialized.
<li>Fix NPE calling Structure.read/write with uninitialized NativeMapped fields. 
</ul>

<h2>Release 3.0.2</h2>
<h3>Features</h3>
<ul>
<li>Attempt to force unload of jnidispatch library prior to deleting it (w32).
<li>Added amd64 targets for OSX, FreeBSD, and Solaris.
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Reduce space allocated for invocation arguments.
<li>Fix NPE when NativeMapped type is used in a Structure.
<li>Fix some X11 type mappings for 64-bit.
<li>Fix OSX Leopard/JRE1.5+ window transparency.
<li>Fix window alpha compositing on X11.
<li>Fix loading of libraries with unicode names on OSX.
</ul>

<h2>Release 3.0.1</h2>
<h3>Features</h3>
<ul>
<li>Improve transparent window drawing performance on w32
<li>Use closure allocation from libffi
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Ensure nested structure arrays initialized with Structure.toArray use the
  appropriate native memory.
<li>Ensure structure size is calculated prior to converting to array
<li>Avoid creating new windows when setting a window mask
<li>Fix bug in Pointer.setChar.
</ul>

<h2>Release 3.0</h2>
<h3>Features</h3>
<ul>
<li>More supported platforms, via GCC's libffi (wmeissner)
<li>Support struct by value as parameter and return value (duncan)
<li>Support struct by reference within structures
<li>Provide access to native peer for java.awt.Component 
<li>Provide access to native peer on OS X.
<li>Support MINGW32 builds (fullung)
<li>Allow per-field Structure read/write by field name
<li>Avoid writing Structure fields marked 'volatile'
<li>Read and wrap function pointers in Structure fields when read with a Java
  proxy to allow easy Java-side invocation (Ken Larson)
<li>Support array-backed Buffers as arguments (wmeissner)
<li>Auto-conversion of custom types (wmeissner)
<li>Allow pointer type-safety
<li>Optional VM crash protection, via Native.setProtected(boolean)
<li>Auto-convert WString[]
<li>Provide library synchronization wrapper similar to Collections.synchronizedX
<li>Support lookup of OSX framework libraries by name
<li>Explicit access to shared library global data
<li>Invocation interception to facilitate translation of C preprocessor macros
  and inline functions
<li>Provide utility to determine Web Start native library cache location;
  auto-include this path if jnidispatch is included as a &lt;nativelib&gt;
  (robertengels) 
<li>Provide access to aligned memory
<li>Versioning information embedded in jna.jar and native library
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Avoid attempts to free native library if it failed to load (wmeissner)
<li>Explicitly check method signatures for varargs instead of heuristically
  guessing (wmeissner)
<li>Disallow declaring Pointer-derived fields in Structures (Function, Memory)
<li>Ensure Object.toString/hashCode/equals methods are intercepted on proxyied
  interfaces
<li>Update X11 library for 64-bit use (wmeissner)
<li>Properly map arrays of char*/wchar_t* under w32
<li>Allow Pointer[] as a Structure field and Function argument
<li>Fix some misleading Structure error messages
<li>Properly preserve/return GetLastError/errno after native calls
<li>Allocate executable memory on w32 to avoid errors with hardware-enforced
  data execution protection (DEP)
<li>Fix VM crash on w32 stdcall callbacks
<li>Use long offsets and sizes rather than ints (64-bit safe)
<li>Properly clean up references and release closure memory on JNI_Unload
<li>Use simpler AWT/JAWT library loading workaround
<li>Avoid changing array references within a Structure on read
</ul>
<h2>Release 2.5</h2>
<h3>Features</h3>
<ul>
<li>Unions
<li>Optimized shaped windows (chris deckers & olivier chafik); instantiation time
improved by about 2-3 orders of magnitude for large, mostly contiguous shapes
<li>Provide type mapping in callback arguments/results
<li>Provide access to ByteBuffer direct address as a Pointer
<li>Provide customization of native string encoding with jna.encoding system property 
</ul>

<h3>Bug Fixes</h3>
<ul>
<li>Properly handle VMs with reversed Structure member storage
<li>Avoid making window undecorated when clearing window mask on X11
<li>Fix structure alignment bug on OSX/PPC when first element is > 4 bytes in size
<li>Clearing OSX window mask by setting to MASK_NONE now works properly
<li>Avoid index exceptions if native buffers are not NUL-terminated on string conversions
<li>Write initialized Structure[] argument memory prior to function calls
<li>Fix IllegalArgumentException reading WString into a Structure
<li>Clear memory when allocating a structure block (fixes VM crash)
<li>Remove versioned JAWT dependency on OSX, allowing use on 10.3/JRE1.4.
</ul>

<h2>Release 2.4</h2>
<h3>Features</h3>
<ul>
<li>Explicitly support unaligned structures
<li>Auto-reallocate structure arrays
<li>Automatic handling of w32 UNICODE/ASCII variants
<li>Automatic mapping of decorated w32 stdcall function names
<li>Customizable, automatic type conversion of arguments and results (wmeissner)
<li>Support char*[] arguments as Java String[] 
<li>Structure supports Callback members (wmeissner)
<li>getByteBuffer from Pointer/Memory (wmeissner)
<li>Allow GC of native libraries
<li>Facilitate use from non-Java contexts (JRuby et al.) (wmeissner)
<li>Improve library path searching (wmeissner)
<li>Handle Structure[] arguments
<li>Handle native long arguments and return values
<li>Handle direct and array-based ByteBuffer arguments (wmeissner)
<li>Change default w32 build to use GCC (it's free, yo)
</ul>

<h3>Bug Fixes</h3>
<ul>
<li>Structure.toArray failed to initialize members
<li>Disallow explicit free of Structure/Memory
<li>Ensure native libraries are only loaded once until released
<li>Properly handle NULL when the return value is a Structure
<li>Proper conversion to wchar_t on linux
<li>Copy full length of Java strings to C strings instead of stopping when a NUL
character is encountered
</ul>
